package com.wangzefeng.shop.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wangzefeng.shop.entity.SysMenu;
import com.wangzefeng.shop.mapper.SysMenuMapper;
import com.wangzefeng.shop.pojo.MenuVo;
import com.wangzefeng.shop.service.SysMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 权限表,相当于菜单表 服务实现类
 * </p>
 *
 * @author wangzefeng
 * @since 2021-03-15
 */
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService {

    @Override
    public List<SysMenu> getMenuListByRoleId(int roleId) {
        return baseMapper.getMenuListByRoleId(roleId);
    }

    @Override
    public List<MenuVo> getMenuTreeByRoleId(int roleId) {
        return baseMapper.getMenuTreeByRoleId(roleId);
    }
}
